﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace LumenLiquid_Tool
{
	/// <summary>
	/// Interaktionslogik für HelpWindow.xaml
	/// </summary>
	public partial class HelpWindow : UserControl
	{
	    public static readonly DependencyProperty DisplayTextProperty =
	        DependencyProperty.Register("DisplayText", typeof (string), typeof (HelpWindow), new PropertyMetadata(default(string)));

	    public string DisplayText
	    {
	        get { return (string) GetValue(DisplayTextProperty); }
	        set { SetValue(DisplayTextProperty, value); }
	    }

        public void Hide()
        {
            ((Storyboard)FindResource("FadeOut")).Begin();
            ((Storyboard)FindResource("FadeIn")).Stop();
        }

        public void Show()
        {
            ((Storyboard)FindResource("FadeOut")).Stop();
            ((Storyboard)FindResource("FadeIn")).Begin();
        }

		public HelpWindow()
		{
			this.InitializeComponent();
		}

        private void UserControl_Loaded(object sender, RoutedEventArgs e)
        {
            this.Height = 60;
        }

	    public void HideInstant()
	    {
            ((Storyboard)FindResource("FadeOut")).Begin();
            ((Storyboard)FindResource("FadeOut")).SkipToFill();
            ((Storyboard)FindResource("FadeIn")).Stop();
	    }
	}
}